on clicked theObject
	tell user defaults
		set theDatabaseFinal to contents of default entry "theDatabaseFinal"
	end tell
	
	display dialog "Insira o nome do Cliente:" default answer ""
	set nomeCliente to the text returned of the result
	
	set theDatabase to "sqlite3 -column " & theDatabaseFinal & space & quote
	
	set moreData to "insert into clientes values('" & nomeCliente & "'); "
	set tail to quote
	do shell script theDatabase & moreData & tail
	
	
	set numObra to "select nomeCliente from clientes ORDER BY nomeCliente ASC; "
	set nomeCliente to (do shell script theDatabase & numObra & quote)
	set popA to popup button "popClientesCriar" of window "Criar Obra"
	call method "removeAllItems" of popA
	set theNu to (number of words in nomeCliente) + 1
	set i to 1
	repeat until i = theNu
		make new menu item at the end of menu items of menu of popA with properties {title:(word i of nomeCliente), enabled:true}
		set i to i + 1
	end repeat
end clicked
